/**
 * 
 */
package com.thinkgsp.jxc.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;

/**
 * 产品往来表
 * @author evan
 *
 */
public class ProductContact extends BaseModel implements Serializable {

	private static final long serialVersionUID = 8548186012282610577L;

	private Long id;
	private Integer invAddId;
	private Integer productId;
	private Long batchNoId;
	private Integer fyear;
	private Integer period;
	private BigDecimal inQty;
	private BigDecimal inAmt;
	private BigDecimal outQty;
	private BigDecimal outAmt;
	private BigDecimal remQty;
	private BigDecimal remAmt;
	private Long billId;
	private Long billDetailId;
	private Date billDate;
	private Integer customerId;
	private Integer direct;
	private String summary;
	
	private String customerCode;
	private String customerName;
	
	private InventoryAdd invAdd;
	private Product product;
	private ProductBatchNo batchNo;
	
	/**
	 * 客户编码
	 * @return
	 */
	public String getCustomerCode() {
		return customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	/**
	 * 客户名称
	 * @return
	 */
	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	/**
	 * 获取存货地址
	 * @return
	 */
	public InventoryAdd getInvAdd() {
		return invAdd;
	}

	public void setInvAdd(InventoryAdd invAdd) {
		this.invAdd = invAdd;
	}

	/**
	 * 获取商品对象
	 * @return
	 */
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	/**
	 * 获取批号对象
	 * @return
	 */
	public ProductBatchNo getBatchNo() {
		return batchNo;
	}

	public void setBatchNo(ProductBatchNo batchNo) {
		this.batchNo = batchNo;
	}

	/**
	 * ID
	 * @return
	 */
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 存货地址ID
	 * @return
	 */
	public Integer getInvAddId() {
		return invAddId;
	}

	public void setInvAddId(Integer invAddId) {
		this.invAddId = invAddId;
	}

	/**
	 * 产品ID
	 * @return
	 */
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	/**
	 * 批号ID
	 * @return
	 */
	public Long getBatchNoId() {
		return batchNoId;
	}

	public void setBatchNoId(Long batchNoId) {
		this.batchNoId = batchNoId;
	}

	/**
	 * 年份
	 * @return
	 */
	public Integer getFyear() {
		return fyear;
	}

	public void setFyear(Integer fyear) {
		this.fyear = fyear;
	}

	/**
	 * 期间
	 * @return
	 */
	public Integer getPeriod() {
		return period;
	}

	public void setPeriod(Integer period) {
		this.period = period;
	}

	/**
	 * 入库数量
	 * @return
	 */
	public BigDecimal getInQty() {
		return inQty;
	}

	public void setInQty(BigDecimal inQty) {
		this.inQty = inQty;
	}

	/**
	 * 入库金额
	 * @return
	 */
	public BigDecimal getInAmt() {
		return inAmt;
	}

	public void setInAmt(BigDecimal inAmt) {
		this.inAmt = inAmt;
	}

	/**
	 * 出库数量
	 * @return
	 */
	public BigDecimal getOutQty() {
		return outQty;
	}

	public void setOutQty(BigDecimal outQty) {
		this.outQty = outQty;
	}

	/**
	 * 出库金额
	 * @return
	 */
	public BigDecimal getOutAmt() {
		return outAmt;
	}

	public void setOutAmt(BigDecimal outAmt) {
		this.outAmt = outAmt;
	}

	/**
	 * 结存数量
	 * @return
	 */
	public BigDecimal getRemQty() {
		return remQty;
	}

	public void setRemQty(BigDecimal remQty) {
		this.remQty = remQty;
	}

	/**
	 * 结存金额
	 * @return
	 */
	public BigDecimal getRemAmt() {
		return remAmt;
	}

	public void setRemAmt(BigDecimal remAmt) {
		this.remAmt = remAmt;
	}

	/**
	 * 单据ID
	 * @return
	 */
	public Long getBillId() {
		return billId;
	}

	public void setBillId(Long billId) {
		this.billId = billId;
	}

	/**
	 * 单据明细ID
	 * @return
	 */
	public Long getBillDetailId() {
		return billDetailId;
	}

	public void setBillDetailId(Long billDetailId) {
		this.billDetailId = billDetailId;
	}

	/**
	 * 单据日期
	 * @return
	 */
	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}

	/**
	 * 客户ID
	 * @return
	 */
	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	/**
	 * 出入库方向 1 代表入库; -1代表出库;0代表初始化或结转
	 * @return
	 */
	public Integer getDirect() {
		return direct;
	}

	public void setDirect(Integer direct) {
		this.direct = direct;
	}

	/**
	 * 摘要信息
	 * @return
	 */
	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#toString()
	 */
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return id.toString();
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object o) {
		if(this == o) {
			return true;
		}
		if(!(o instanceof ProductContact)) {
			return false;
		}
		final ProductContact pc = (ProductContact)o;
		if(id != null) {
			return id.equals(pc.getId());
		} else {
			return pc.getId() == null;
		}
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.model.BaseModel#hashCode()
	 */
	@Override
	public int hashCode() {
		return (this.id != null ? this.id.hashCode() : 0);
	}

}
